<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style type="text/css">
        .placeholder {
            border: 3px dashed #e6e6e6;
            min-height: 238px;
            padding-top: 158px;
            text-align: center;
            background: url(./image.png) center 93px no-repeat;
            color: #cccccc;
            font-size: 18px;
            position: relative;
        }
        .webuploader-pick {
            font-size: 18px;
            background: #00b7ee;
            border-radius: 3px;
            line-height: 44px;
            padding: 0 30px;
            color: #fff;
            display: inline-block;
            margin: 20px auto;
            cursor: pointer;
            box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
        }
        .webuploader-pick {
            position: relative;
            display: inline-block;
            background: #00b7ee;
            border: 1px solid #99D3F5;
            border-radius: 4px;
            padding: 10px 18px;
            overflow: hidden;
            color: white;
            text-decoration: none;
            text-indent: 0;
            line-height: 20px;
            font-size: 12px;
            cursor: pointer;
        }
        .webuploader-pick input {
            position: absolute;
            right: 0;
            top: 0;
            opacity: 0;
            padding: 10px 18px;
            cursor: pointer;
        }
        .webuploader-pick:hover {
            background: #AADFFD;
            border-color: #78C3F3;
            color: red;
            text-decoration: none;
        }
    </style>
</head>
<body>
    <form method="post" enctype="multipart/form-data" action="/upload">
        
        <div class="placeholder">
            <div class="filename"></div>
            <div class="webuploader-pick">
                <input type="file" name="file" onchange="show()" id="file1"/>
                选择图片
            </div>
            &nbsp;&nbsp;
            <div class="webuploader-pick">
                <input type="submit" value="提交">
                提交
            </div>
        </div>
    </form>
</body>
<script>
    function show() {
        var file1 = document.getElementById("file1");
        var val = file1.value;
        var arr = val.split("\\");
        document.getElementsByClassName("filename")[0].innerHTML = arr[2];
    }
</script>
</html>